package com.zxg.util;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public enum WeixinComponent {

  ZXG("zxg");
  private WeixinComponent(String app) {

  }

  public String getValue() {

    if (this.equals(ZXG))
      return "zxg";

    return "undefined";
  }

  public static WeixinComponent getAPP(String s) {

    if (s != null && s.equals("zxg"))
      return ZXG;

    return null;
  }

  public static List<WeixinComponent> getAll() {
    List<WeixinComponent> list = new ArrayList<WeixinComponent>();

    list.add(ZXG);

    return list;
  }

  public static List<WeixinComponent> getList(WeixinComponent... apps) {
    List<WeixinComponent> list = new ArrayList<WeixinComponent>();
    list.addAll(Arrays.asList(apps));
    return list;
  }

  public static void main(String[] args) {
    System.out.println(WeixinComponent.valueOf("zxg"));
  }

}
